package com.etc.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSenderImpl;

public class SMTPUtil {

    @Autowired
    private static JavaMailSenderImpl javaMailSender;//简单邮件发送

    public static void sendEmail(String email , String password){
        SimpleMailMessage simpleMailMessage = new SimpleMailMessage();
        simpleMailMessage.setSubject("灵感涌动密码修改");
        simpleMailMessage.setTo(email);
        simpleMailMessage.setText("您的密码修改为： "+password);
        simpleMailMessage.setFrom("1182125876@qq.com");
        javaMailSender.send(simpleMailMessage);

    }
}
